package com.bcu.cn.onlineexamsystem.exammanage.mapper;

import com.bcu.cn.onlineexamsystem.exammanage.entity.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface QuestionMapper {
    @Select("SELECT * FROM questions WHERE course_id = #{courseId} " +
            "AND (#{type} = 'all' OR type = #{type}) " +
            "ORDER BY create_time DESC")
    List<Question> findByCourseIdAndType(String courseId, String type);
} 